<template>
  <div class="selected">
    <Topbar/>
      <div v-for="(v,i) in this.$store.state.cakem.arr" :key="i" @click="fbn(v.goodsid)">
          <img :src="v.cakeimage">
          <p>{{v.cakename}}</p>
          <span>{{v.cakeprice}} | {{v.cakeoriginal}}</span>
          <hr>
      </div>
         <Bottom />
  </div>
</template>

<script>
import Topbar from "@/components/lp/topbar.vue"
import Bottom from "../../components/my/bottom";
export default {
  components: {
    Topbar, Bottom
  },
  created(){
  
      this.$store.dispatch("axiosgiftcake")
      console.log(this.$store.state.arr)
  
  },
  methods:{
    fbn(id){
      this.$router.push({name:"Strategycake",params:{xiaoming:id}})
    }
  }
  
}
</script>
<style scoped>
div{
    font-size: 0.16rem;
    text-align: center;
    margin-bottom: 0.2rem;
}
img{
    width: 100%;
}
p{
    font-size: 0.26rem;
    margin: 0.1rem 0;
}
span{
    display: block;
    font-size: 0.16rem;
    color: #b9b5b5;
    padding-bottom: 0.1rem;
}
</style>